<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            overflow: hidden;
            display: flex;
            width: 1366px;
            height: 600px;
            background-image: url(./images/bg.jpg);
            margin: 0 auto;
        }
        .father .left,
        .father .right{
            width: 50%;
            height: 600px;
            background-image: url(./images/fm.jpg);
            transition: all 1s;

        }
        .father .right{
            /* right表示取到精灵图右面的图片 */
            background-position: right 0;
        }
        鼠标悬停的效果：左右移动
        .father:hover .left{
            transform: translate(-100%);
        }
        .father:hover .right{
            transform: translateX(100%);
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="left"></div>
        <div class="right"></div>
    </div>
</body>
</html>